(function() {
	var Connect = YAHOO.util.Connect;
	
	Wallet.util.Updater = function(el, uri) {
		this.el = el;
		this.uri = uri;
		
		var u = this;
		this.callback = {
			success: function(req) {
				u.success(req);
			},
			failure: function(req) {
				u.failure(req);
			}
		};	
		
		Connect.asyncRequest("POST", this.uri, this.callback);
	}
	
	Wallet.util.Updater.prototype = {
		success: function(req) {
			if (this.el) {
				this.el.innerHTML = req.responseText;
			}
		},
		failure: function(req) {
			alert("Updater Error");
		}	
	}
}());